/**
 * desc：  路由模块
 * author：DestinyJun
 * date：  2021/5/11 14:34
 */

import VueRouter from "vue-router";
import Home from "./view/Home/Home.vue";
import Header from "./view/Home/Header/Header.vue";
import Footer from "./view/Home/Footer/Footer.vue";
import User from "./view/User/User.vue";
import Vue from "vue";

Vue.use(VueRouter)

// 创建路由对象
const router = new VueRouter({
  mode:'hash',
  // base: process.env.BASE_URL,
  routes: [
    {
      path: '/home',
      component: Home,
      children: [
        {path: 'header', component: Header},
        {path: 'footer', component: Footer},
      ]
    },
    {path: '/user',  component: User},
  ]
})

export default router
